Read multiple barcodes from an image with symbologies from a specified group and options.
public BarcodeData[] ReadBarcodes(
RasterImage image,
LogicalRectangle searchBounds,
int maximumBarcodes,
BarcodeSymbology[] symbologies,
BarcodeReadOptions[] options
)
Public Overloads Function ReadBarcodes( _
ByVal image As Leadtools.RasterImage, _
ByVal searchBounds As Leadtools.Forms.LogicalRectangle, _
ByVal maximumBarcodes As Integer, _
ByVal symbologies() As Leadtools.Barcode.BarcodeSymbology, _
ByVal options() As Leadtools.Barcode.BarcodeReadOptions _
) As Leadtools.Barcode.BarcodeData()
public [Leadtools.Barcode.BarcodeData[]](barcodedata.md) ReadBarcodes(
Leadtools.RasterImage image,
Leadtools.Forms.LogicalRectangle searchBounds,
int maximumBarcodes,
Leadtools.Barcode.BarcodeSymbology[] symbologies,
Leadtools.Barcode.BarcodeReadOptions[] options
)
- (nullable NSArray<LTBarcodeData *> *)readBarcodes:(LTRasterImage *)image
searchBounds:(LeadRect)searchBounds
maximumBarcodes:(NSUInteger)maximumBarcodes
symbologies:(nullable NSArray<NSNumber *> *)symbologies
options:(nullable NSArray<LTBarcodeReadOptions *> *)options
error:(NSError **)error
public BarcodeData[] readBarcodes(
RasterImage image,
LeadRect searchBounds,
int maximumBarcodes,
BarcodeSymbology[] symbologies,
BarcodeReadOptions[] options
)
function Leadtools.Barcode.BarcodeReader.ReadBarcodes(RasterImage,LogicalRectangle,Int32,BarcodeSymbology[],BarcodeReadOptions[])(
image ,
searchBounds ,
maximumBarcodes ,
symbologies ,
options
)
public:
Leadtools.Barcode.array<BarcodeData^>^ ReadBarcodes(
Leadtools.RasterImage^ image,
Leadtools.Forms.LogicalRectangle searchBounds,
int maximumBarcodes,
Leadtools.Barcode.array<BarcodeSymbology>^ symbologies,
Leadtools.Barcode.array<BarcodeReadOptions^>^ options
)
image
A RasterImage object that contains the image data. Must not be null (Nothing in VB).
searchBounds
A LogicalRectangle that specifies the region of interest area in the image where the barcodes search and detection is performed. You can specify LogicalRectangle.Empty to indicate that the search must be performed on the whole image.
maximumBarcodes
An Int32 that specifies the maximum number of barcodes to return. Must be a value greater than or equal to 0. The value of 0 means all barcodes.
symbologies
An array of BarcodeSymbology enumeration members that specifies the barcode symbologies (types) to search for.
options
An array of BarcodeReadOptions that specifies the options to use. This can be null (Nothing in VB), where the current default options is used. Otherwise, the method will use the options that corresponds to the symbologies being read, if the array does not contain specific options for a symbologies being read, then the default version will be used.
An array of BarcodeData objects or derived classes that contains the symbology, data, location and any rotation angle for each barcode found. If no barcodes can be found, then this method will return an empty array (Length equals to 0).
Use this method if you want to read multiple barcodes of the same or multiple symbologies from an image. For example, to read all UPC and QR barcodes in the image, use an array of BarcodeSymbology.UPC-A, BarcodeSymbology.UPC-E and BarcodeSymbology.QR.
LEADTOOLS barcode read engine is optimized for speed and can search for multiple similar symbologies at the same time. This method simply returns the first barcode that is detected correctly using the symbologies and current options.
The ReadSymbology event will occur before and after attempting to read any symbology. The read options being used whether the default or specified will be set in the BarcodeReadSymbologyEventArgs.Options property of the event data.
If symbologies is null (Nothing in VB), then this method will use all the currently available symbologies. If this parameter contains an empty array, then no barcode will be detected and an empty array will be returned.
The BarcodeReader provides the following barcode read methods:
Method | Description |
---|---|
ReadBarcode(RasterImage image, LogicalRectangle searchBounds, BarcodeSymbology symbology) and ReadBarcode(RasterImage image, LogicalRectangle searchBounds, BarcodeSymbology symbology, BarcodeReadOptions options) |
Read one barcode from an image with specified symbology and default or specific options. Use these methods if you want to read a single barcode from the image, for example, a QR symbol by specifying BarcodeSymbology.QR or if you want to read any barcode found regardless of its type by using BarcodeSymbology.Unknown. |
ReadBarcode(RasterImage image, LogicalRectangle searchBounds, BarcodeSymbology[] symbologies) and ReadBarcode(RasterImage image, LogicalRectangle searchBounds, BarcodeSymbology[] symbologies, BarcodeReadOptions[] options) |
Read one barcode from an image with a symbology from a specified group and default or specific options. Use these methods if you want to read a single barcode from a known group. For example, to read a barcode that can be of any UPC type, pass an array of BarcodeSymbology.UPCA and BarcodeSymbology.UPCE. |
ReadBarcodes(RasterImage image, LogicalRectangle searchBounds, int maximumBarcodes, BarcodeSymbology[] symbologies) and ReadBarcodes(RasterImage image, LogicalRectangle searchBounds, int maximumBarcodes, BarcodeSymbology[] symbologies, BarcodeReadOptions[] options) |
Read multiple barcodes from an image with symbologies from a specified group and default or specific options. Use these methods if you want to read multiple barcodes of the same or multiple symbologies. |
This example creates two threads: One for reading horizontal barcodes and one for reading vertical barcodes. Then it uses the same BarcodeReader to try and read all the barcodes from an image using both threads
ReadBarcode(RasterImage image, LogicalRectangle searchBounds, BarcodeSymbology symbology)
ReadBarcode(RasterImage image, LogicalRectangle searchBounds, BarcodeSymbology[] symbologies)
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET